package com.crazy.crazytransactionservice.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.crazy.crazymodel.model.entity.Transaction;
import com.crazy.crazymodel.model.vo.ImageVO;
import com.crazy.crazymodel.model.vo.SubscribeVO;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigDecimal;

/**
 * @Date: 2024-05-06-20:26
 * @Author: Zheng Zeliang
 * 申购Service
 */
public interface BuyService extends IService<Transaction> {

    /**
     * 申购
     * @param customerID
     * @param productID
     * @param amount
     * @param bankCardNumber
     * @return
     */
    SubscribeVO subscribe(int customerID, int productID, BigDecimal amount, String bankCardNumber);


    /**
     * 确认申购
     * @param transactionId
     */
    void confirmSubscribe(int transactionId);

    /**
     * 根据图片进行申购
     * @param file
     * @return
     */
    SubscribeVO subscribeByImage(MultipartFile file);

    /**
     * 解析图片
     * @param file
     * @return
     */
    ImageVO anaylizeImage(MultipartFile file);
}
